import request from '@/utils/request'

// 查询通讯录列表
export function listAddressList(query) {
  return request({
    url: '/zuzhi/addressList/list',
    method: 'get',
    params: query
  })
}

// 查询通讯录详细
export function getAddressList(id) {
  return request({
    url: '/zuzhi/addressList/' + id,
    method: 'get'
  })
}

// 新增通讯录
export function addAddressList(data) {
  return request({
    url: '/zuzhi/addressList',
    method: 'post',
    data: data
  })
}

// 修改通讯录
export function updateAddressList(data) {
  return request({
    url: '/zuzhi/addressList',
    method: 'put',
    data: data
  })
}

// 删除通讯录
export function delAddressList(id) {
  return request({
    url: '/zuzhi/addressList/' + id,
    method: 'delete'
  })
}

export function updateAddressListDepartment(data) {
  return request({
    url: '/zuzhi/addressList/updateDept',
    method: 'put',
    data
  })
}
